package org.kepler;

import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collector;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * Created by wanglinlin on 2016/12/17.
 */
public class ReadTxtJava8 {
    public static void main(String[] args) throws IOException {
        List<String> lines = Files.lines(Paths.get("D:\\运程test.txt"), StandardCharsets.UTF_8).collect(Collectors.toList());


        for (String line : lines) {
            line.trim().replace(" ", "");
            System.out.println(line);

        }

    }
}
